From time to time it is important to test computer memory to be sure that a bit, such as a 1, reads as a 1 when that location is read from. It is also important that when a 0 is stored at that same location at a later time, a 0 is subsequently read therefrom. This test is important to in order to detect and correct stuck bits and thus requires a cycle from a “1” to an “0” and back to an “1” to be certain that a bit is not stuck.
In some situations, the system can not directly access certain memory locations so detecting stuck bits is difficult. For example, the bits used to store a tag for a cache line are often not directly readable. Also, error correcting codes (ECC) are also invisible to the user process because the hardware generates those bits to make sure the data is correct when it is read from memory. Thus, ECC bits are self-generated dependent upon the bits stored at a particular location and are not stored under user control.
Currently, systems use a software loop which walks through every single address in memory, writing a pattern, reading it back, then writing the inverse of that pattern and reading it back. However, because of the issues with the tag and ECC bits, four loops through memory have typically been necessary for testing purposes.
In systems having large memories the existing bit testing process is time consuming and as memory is added the amount of initialization time increases.